import request from '@/utils/request'
// 新增年级
export function addGrade (data) {
  return request({
    url: '/more/school/addGrade',
    method: 'post',
    data: data
  })
}
// 新增校区
export function addSchool (data) {
  return request({
    url: '/system/dept',
    method: 'post',
    data: data
  })
}
export function pageGrade (data) {
  return request({
    url: '/more/school/pageGrade',
    method: 'post',
    data: data
  })
}
// 删除年级
export function deleteGrade (gradeIds) {
  return request({
    url: '/more/school/deleteGrade/' + gradeIds,
    method: 'delete',
  })
}
// 年级详情
export function gradeDetail (query) {
  return request({
    url: '/more/school/gradeDetail',
    method: 'get',
    params: query
  })
}
// 修改年级
export function updateGrade (data) {
  return request({
    url: '/more/school/updateGrade',
    method: 'post',
    data: data
  })
}
// 修改校区
export function updateSchool (data) {
  return request({
    url: '/more/school/updateSchool',
    method: 'put',
    data: data
  })
}
// 删除部门
export function delschool (deptId) {
  return request({
    url: '/system/dept/' + deptId,
    method: 'delete'
  })
}

// 查询列表年级
export function listGrade (query) {
  return request({
    url: '/more/school/listGrade',
    method: 'get',
    params: query
  })
}
// 查询校区列表
export function listSchool (query) {
  return request({
    url: '/system/dept/listParent/',
    method: 'get',
    params: query
  })
}
// 根据校区查年级
export function listGradedid (query) {
  return request({
    url: '/more/school/listGradeByDeptId',
    method: 'get',
    params: query
  })
}
// 查询校区列表
// export function listSchool (deptId) {
//   return request({
//     url: '/system/dept/list/exclude/' + deptId,
//     method: 'get',
//   })
// }

